<template>
	<view>
		<view v-if='loading' class="view-center">
			<u-loading :color="color" size="50"></u-loading>
			<view :style="'color:'+color+';margin-top:15rpx;'">{{loadingText}}</view>
		</view>
		<view v-else>
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:{
			//自定义图标
			loading: {
				type: [Boolean, String],
				default: false
			},
			color:{
				type: String,
				default: "#55aaff"
			},
			loadingText:{
				type: String,
				default: "数据加载中"
			},
		}
	}
</script>

<style>

</style>
